/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package picshareservertest;

import java.net.InetAddress;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.util.ArrayList;
import java.util.List;
import shared.PicRegistry;
import shared.ServerInfo;

/**
 *
 * @author Eric
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {

        ConfigurationManager configManager = new ConfigurationManager();
        configManager.setLocationRelativeTo(null);
        configManager.setSize(520,150);
        configManager.setResizable(false);
        configManager.setDefaultCloseOperation(ConfigurationManager.EXIT_ON_CLOSE);
        configManager.setVisible(true);

        ServerControl serverControl = new ServerControl();
        configManager.registerConfigurationListener(serverControl);


        /*
         if (System.getSecurityManager() == null) {
           System.setSecurityManager(new SecurityManager());
        }
        try {
            //String name = "Compute";
            ConfigurationManager configManager = new ConfigurationManager();


        
            ServerInfo info = new ServerInfo();
            info.setAddress(InetAddress.getLocalHost());
            info.setName(InetAddress.getLocalHost().getHostName());
            List<String> fileList = new ArrayList();
            fileList.add("File1.txt");
            fileList.add("FileTwo.txt");
            info.setFileList(fileList);
            picRegistry.registerServer(info);


        } catch (Exception e) {
            System.err.println("FacePicRegistry Exception:");
            e.printStackTrace();
        } */
    }

}
